<?php
include('../database/connection.php');
if ($_POST) {
    $app_id = $_POST['app_id'];
    $user_id = $_POST['user_id'];
    $comment = $_POST['comment'];
    $uname = $_POST['uname'];
    $time = date("c");
    

    $sql = "insert into comment(app_id,user_id,comment, time) values ('$app_id','$user_id','$comment','$time')";
    //echo $sql;
    mysqli_query($conn, $sql);
} else {
    
}
?>


<?php
// echo $uname."   ".$comment;
// if (isset($_SESSION['uname']) && !empty($_SESSION['uname']) ){
//     echo $comment;
$atime = "<abbr class='timeago' title='$time'></abbr>";
?>


<li class="box" style="display: list-item;">
    <img src="http://www.oeic.us/img/site/icons/default_avatar.gif" class="com_img"/><span  class="com_name"> <?php echo $uname; ?></span> <?php echo $atime; ?><br /><br />

    <?php echo $comment; ?>
</li>
<?php
// }
?>
